The <EMBED>
element allows authors to embed objects directly into an HTML page
The basic syntax is:
<EMBED SRC="_URL_">
<NOEMBED>Alternative content</NOEMBED>
</EMBED>
where "_URL_" represents the URL of the object that is to be embedded. See below for a description of the <NOEMBED>
element.
The <EMBED>
element will allow you to embed documents, or objects of any type. Your user only needs to have an application which can view the data installed correctly on their machine, or have a plug-in (for Netscape and Internet Explorer) that can manipulate the embedded file format.
The <EMBED>
element can be used more or less the same as the <IMG>
element and so accepts typical image embedding attributes such as WIDTH, HEIGHT, BORDER, HSPACE, VSPACE and NAME (for referencing the embedded object in a script function). Note that multiple <EMBED>
elements can be grouped together with the same NAME
attribute value, to provide mutliple separate controls for a single embedded sound file).
Netscape Plug-ins
Netscape plug-ins make use of the <EMBED>
element. Essentially, plug-ins are dynamic code modules which are associated with a MIME data type that the Netscape client has no native support for. When Netscape encounters an unknown data type from a server, it will search for a plug-in that is associated with that MIME type and load it, enabling viewing/transforming of the data object. There are many attributes to the <EMBED>
element that are plug-in specific (for these, see the relevant plug-in documentation), but as well as the attributes above, the <EMBED>
element accepts the following attributes as standard across all embedded data types.
HIDDEN="true|false"
Setting this attribute specified whether the plug-in is visible or not. Some plug-ins (like the LiveAudio plug-in) can control the embedded data type without being visible. The default value is "false", which causes the plug-in controls to be displayed.
PALETTE="foreground|background"
For users browsing in 256 colours, some embedded objects could cause what is known as 'palette flash', where palette differences between the embedded object and the browser/system cause the incorrect colours to be displayed. To avoid this, embedded objects can have their palettes expressly defined as either foreground
or background
(the default). 'Foreground' causes the embedded object to use the foreground palette and 'background' forces it to use the background palette (the colours not reserved by the browser/system). Note that this attribute only has effect on the Windows platforms.
PLUGINSPACE="_URL_"
If the user doesn't have a plug-in installed to handle the defined object data type (determined from the SRC
attribute, or TYPE
attribute value), then it is possible to guide the user to a different URL (the value of the PLUGINSPACE
attribute) to provide instructions on installing the necessary plug-in module. Generally, this should be the plug-in vendors installation instructions document.
TYPE="MIME type"
Either this, or the SRC
attribute is necessary when inserting embedded objects into HTML documents, in order for Netscape to be able to determing a suitable plug-in module to use to handle the data type. The TYPE
attribute accepts any valid MIME type, to describe the type of object being inserted.
Netscape now comes (if the standard version is downloaded) with some plug-ins pre-installed allowing the embedding of video, audio, VRML worlds and quicktime movies. The plug-in specific syntax for these particular plug-ins is briefly described below.
Live3D (embedding VRML worlds)
The Live3D plug-in accepts just standard <EMBED>
attributes for the embedding of VRML worlds.
LiveAudio (embedding sound files)
As well as the above attributes, when embedding sound files using the LiveAudio plug-in (as distributed with Netscape, supporting WAV, AIFF, AU and MIDI sound files), the following attributes are supported :
STARTTIME="01:20"
console
will be used, presenting the user with the entire array of controls that the LiveAudio plug-in supports.
NAME
) is to be treated as the genuine sound file. Using a group of embedded controls, it is possible to control a single embedded sound file at multiple points in the document. The actual <EMBED>
element that includes the genuine sound file to be embedded must contain the MASTERSOUND
flag attribute.
CONTROLS="volumelever"
to control many sound files. In this case, set the NAME
attribute of the controlling volume lever to MASTERVOLUME
so that Netscape knows that it controls all embedded sound files that have the same NAME
attribute.
LiveVideo (embedding .AVI video clips)
As well as the standard <EMBED>
attributes described above, when embedding video clips, the <EMBED>
element supports the AUTOSTART and LOOP attributes. Their accepted values are as described in the LiveAudio plug-in section above.
QuickTime(embedding QuickTime and QuickTimeVR movies)
Netscape now comes with a QuickTime (and QuickTimeVR) movie plug-in as standard. As well as the standard <EMBED>
attributes, when embedding a QuickTime object, the following attributes are suported.
AUTOSTART
attribute and can be used to specify whether the QuickTime move will begin to play as soon as sufficient video data has been downloaded by Netscape.
CONTROLLER="true"
.
palindrome
value forces the movie to be played forwards, then backwards on a continuous loop.
PLAYEVERYFRAME="true"
. Note that setting PLAYEVERYFRAME="true"
disables sound in QuickTime movies that contain it.
HREF
attribute can provide a URL to navigate to if the movie is clicked by the user when playing.
HREF
attribute is set to a URL, the TARGET
attribute can be set to reference a valid frame in which the URL given in the HREF
attribute will be displayed.
PAN
attribute can be set to an value (typically between 0 and 360 degrees), to specify the initial pan angle for display of the QuickTime VR object.
PAN
attribute, the TILT
attribuet can be used to set the initial tilt (between -42.5 and 42.5 degrees) of the QuickTime VR object.
NODE
attribute can be used to specify the initial node to display.
HIDDEN
attribute is a flag. If the HIDDEN
flag is present, the movie is not visible. This may be useful to play a sound-only QuickTime movie.
For more information about the QuickTime plug-in supplied with Netscape, visit http://quicktime.apple.com/
For more information about plug-ins, see the Netscape web site. http://home.netscape.com/. Lots of plug-in modules are available, the additional attributes for which are beyond the scope of this document. The documentation with the plug-in should be consulted for useable HTML element attributes.
NOTE : Microsoft's Internet Explorer (from version 3.0 beta 2) fully supports Netscape plug-ins. When Internet Explorer loads a page designed to use a (Netscape) plug-in module, it will use either the correct plug-in, or a pre-installed ActiveX control to display the content as authored. Microsoft recently released the ActiveVRML and ActiveMovie add-ons for Internet Explorer which can handle VRML worlds, AVI, QuickTime, MPEG video/audio, WAV, Sun AU and AIFF sound files respectively, either using the respective ActiveX <OBJECT>
code, or <EMBED>
code as used by popular Netscape plug-ins.
Examples
Below is an embedded MIDI file. Use the control panel to play it. The code used to embed it is:
<EMBED SRC="clouds.mid" WIDTH="145" HEIGHT="61">
NOTE : Internet Explorer will use the Netscape 'LiveAudio' plug-in (if Netscape 3.0 is installed, the LiveAudio plug-in distributed with Netscape Communicator will not function inside Internet Explorer)), or any installed ActiveX control for manipulation of the above MIDI file)
Below is an embedded VRML world. Use the Live3D control panel to manipulate it. The code used to embed it is:
<EMBED SRC="../img/example.wrl" WIDTH="200" HEIGHT="150">
NOTE : Internet Explorer will use the ActiveVRML add-in (if installed), or whatever Netscape plug-in is used within Netscape to handle the above Virtual world.
<NOEMBED>
Much like the <NOFRAMES>
element, <NOEMBED>
can be used to provide alternative content for older browsers that don't understand the <EMBED>
element. Older browsers will ignore the <EMBED>
element (and the <NOEMBED>
element to be exact), but will render any HTML content they find in between the <EMBED>
and </EMBED>
elements. Browsers that do understand the <EMBED>
element will not render any content between the <EMBED>
and </EMBED>
elements. For example :
<EMBED SRC="MyWorld.wrl" WIDTH="200" HEIGHT="150">
<NOEMBED>You need Netscape or Internet Explorer to see this</NOEMBED>
</EMBED>
Netscape (from version 2.0) and Internet Explorer (from version 3.0) would embed the VRML world "MyWorld.wrl" (providing there is a suitable plug-in/ActiveX control installed), while older browsers would display the message 'You need Netscape or Internet Explorer to see this'